<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_bootstrap.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:03 GMT -->
<head>
	<base href="<%=basePath%>">
    <meta charset="utf-8">
    <title>试卷列表</title>
    <link href="hplus/css/plugins/summernote/summernote.css" rel="stylesheet">
    <link href="hplus/css/plugins/summernote/summernote-bs3.css" rel="stylesheet">
   <%@ include file="/common/common_css.jsp" %>
</head>

<body class="gray-bg">
    <div class="">
	    <div class="ibox float-e-margins">
	        <div class="ibox-content">
	        		<form method="post" action="examPaper/add" class="form-horizontal">
                   <div class="form-group">
                       <label class="col-sm-2 control-label">试卷名称:</label>
                       <div class="col-sm-10">
                           <input type="text" name="name"  class="form-control"/>
                       </div>
                   </div>
                   <h3>试卷组成</h3> <hr />
                   <a href="#"  onclick="addDetail();return false;">添加试卷组成部分</a>
                   <table id="strategeDetails"  class="table table-bordered table-condensed">
                    	<thead>
                    		<tr>
                    			<th>试题类型</th><th>所属年级</th><th>难易度</th><th>版块</th><th>数量</th>
                    		</tr>
                    	</thead>
                    	<tbody>
                    		<tr>
                    			<td>
                    				<select onchange="setPartName(this);" class="form-control" name="examPaperPartsList[0].questionType_id"><option value="-1">不限</option>
                    					<c:forEach items="${questionTypes }" var="type">
                    						<option value="${type.id }">${type.name }</option>
                    					</c:forEach>
                    				 </select>
                    				 <input type="hidden" name="examPaperPartsList[0].partName" id="partsName"/>
                    				 <script>
                    				 	function setPartName(aa){
                        				 	$(aa).next().val($(aa).find(":selected").text());
                        				 }
                    				 </script>
                    			</td>
                    			<td>
                    				<select class="form-control"  name="examPaperPartsList[0].grade_id"><option value="-1">不限</option> 
                    				<c:forEach items="${grades }" var="type">
                    						<option value="${type.id }">${type.name }</option>
                    					</c:forEach>
                    				</select>
                    			</td>
                    			<td>
                    				<select class="form-control"  name="examPaperPartsList[0].difficulty_id"><option value="-1">不限</option> 
                    				<c:forEach items="${difficulties }" var="type">
                    						<option value="${type.id }">${type.name }</option>
                    					</c:forEach>
                    				</select>
                    			</td>
                    			<td>
                    				<select class="form-control"  name="examPaperPartsList[0].board_id"><option value="-1">不限</option> 
                    					<c:forEach items="${boards }" var="type">
                    						<option value="${type.id }">${type.name }</option>
                    					</c:forEach>
                    				</select>
                    			</td>
                    			<td>
                    				<input type="number"  name="examPaperPartsList[0].quesCount" value="1"/>
                    			</td>
                    		</tr>
                    	</tbody>
                    </table>
                 </form>
	        </div>
	     </div>
    </div>
    <%@ include file="/common/common_js.jsp" %>
    <script type="text/javascript">
  //添加组题策略
	function addDetail(){
		$("#strategeDetails tbody tr:last").clone(true).appendTo("#strategeDetails tbody");
	}
    </script>
</body>


<!-- Mirrored from www.zi-han.net/theme/hplus/table_bootstrap.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:20:06 GMT -->
</html>


